<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="vue.js"></script>

</head>

<body>
    <div id="app">
        <h1>哈哈</h1>
        <h2 v-for="i in h2Num">我是新增的一行</h2>
        <button v-for="i in btnNum">haha,我是新增的按钮</button>
        <hr>
        <button @click.once="h2Num++">点我增加一行</button>
        <button @click="btnNum++">点我增加一个按钮</button>
    </div>
    <script>
        new Vue({
            el: "#app",
            data: {
                h2Num: 0,
                btnNum: 0
            },

        })
    </script>
</body>

</html>